-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Phytium] [Deepin Kernel SIG] Fix compile errors with clang-19 #504
Merged
Avenger-285714
merged 6 commits into
deepin-community:linux-6.6.y
from
Avenger-285714:linux-6.6.y
Nov 28, 2024
Merged
[Phytium] [Deepin Kernel SIG] Fix compile errors with clang-19 #504
Avenger-285714
merged 6 commits into
deepin-community:linux-6.6.y
from
Avenger-285714:linux-6.6.y
Nov 28, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix follow error with clang-19: drivers/pwm/pwm-phytium.c:233:2: error: variable 'dbcly' is uninitialized when used here [-Werror,-Wuninitialized] 233 | dbcly &= 0x0; | ^~~~~ drivers/pwm/pwm-phytium.c:226:11: note: initialize the variable 'dbcly' to silence this warning 226 | u64 dbcly, cycles, upcycles, dwcycles; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
…lang Fix follow errors with clang-19: sound/soc/phytium/phytium_i2s.c:979:18: error: variable 'bus_widths' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 979 | static const u32 bus_widths[COMP_MAX_DATA_WIDTH] = { | ^~~~~~~~~~ sound/soc/phytium/phytium_i2s.c:987:18: error: variable 'formats' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] 987 | static const u32 formats[COMP_MAX_WORDSIZE] = { | ^~~~~~~ 2 errors generated. Signed-off-by: WangYuli <[email protected]>
Fix follow error with clang-19: drivers/i3c/master/i3c-master-phytium.c:1710:7: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 1710 | if (!master->prescl0) | ^~~~~~~~~~~~~~~~ drivers/i3c/master/i3c-master-phytium.c:1788:9: note: uninitialized use occurs here 1788 | return ret; | ^~~ drivers/i3c/master/i3c-master-phytium.c:1710:3: note: remove the 'if' if its condition is always false 1710 | if (!master->prescl0) | ^~~~~~~~~~~~~~~~~~~~~ 1711 | goto err_disable_sysclk; | ~~~~~~~~~~~~~~~~~~~~~~~ drivers/i3c/master/i3c-master-phytium.c:1669:9: note: initialize the variable 'ret' to silence this warning 1669 | int ret, irq; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
We'll apply a bitwise AND to the controller's rxerrirq and rxerrien to isolate interrupts that are both triggered and enabled. This filtering ensures that we only process relevant interrupts. Self bitwise AND operations are meaningless. Fix follow error with clang-19: drivers/usb/phytium/host.c:451:11: error: explicitly assigning value of variable of type 'uint16_t' (aka 'unsigned short') to itself [-Werror,-Wself-assign] 451 | rxerrirq &= rxerrirq; | ~~~~~~~~ ^ ~~~~~~~~ 1 error generated. Signed-off-by: WangYuli <[email protected]>
Fix follow error with clang-19: drivers/net/ethernet/phytium/phytmac_main.c:1818:2: error: variable 'ret' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] 1818 | default: | ^~~~~~~ drivers/net/ethernet/phytium/phytmac_main.c:1822:9: note: uninitialized use occurs here 1822 | return ret; | ^~~ drivers/net/ethernet/phytium/phytmac_main.c:1799:9: note: initialize the variable 'ret' to silence this warning 1799 | int ret; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
…ta->msg_regs Fix follow error with clang-19: drivers/net/ethernet/phytium/phytmac_platform.c:130:8: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] 130 | if (!pdata->msg_regs) { | ^~~~~~~~~~~~~~~~ drivers/net/ethernet/phytium/phytmac_platform.c:202:9: note: uninitialized use occurs here 202 | return ret; | ^~~ drivers/net/ethernet/phytium/phytmac_platform.c:130:4: note: remove the 'if' if its condition is always false 130 | if (!pdata->msg_regs) { | ^~~~~~~~~~~~~~~~~~~~~~~ 131 | dev_err(&pdev->dev, "msg_regs ioremap failed, i=%d\n", i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 132 | goto err_mem; | ~~~~~~~~~~~~~ 133 | } | ~ drivers/net/ethernet/phytium/phytmac_platform.c:81:9: note: initialize the variable 'ret' to silence this warning 81 | int ret, i; | ^ | = 0 1 error generated. Signed-off-by: WangYuli <[email protected]>
Avenger-285714
merged commit Nov 28, 2024
f39973c
into
deepin-community:linux-6.6.y
4 of 5 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.